import 'package:flutter/material.dart';
class WXPage extends StatelessWidget {

  List<Tab> _Tabs = <Tab>[
    new Tab(text: '电视'),
    new Tab(text: '电影'),
    new Tab(text: '综艺'),
    new Tab(text: '读书'),
  ];

  @override
  Widget build(BuildContext context) {
    return new DefaultTabController(
      length: _Tabs.length,
      child: new Scaffold(
        appBar: new AppBar(
          leading: IconButton(icon: Icon(Icons.arrow_back), onPressed: () {}),
          title: Text("这是一个AppBar"),
          actions: <Widget>[
            IconButton(icon: Icon(Icons.add), onPressed: () {}),
            IconButton(icon: Icon(Icons.dashboard), onPressed: () {}),
            IconButton(icon: Icon(Icons.cached), onPressed: () {}),
          ],
          bottom: new TabBar(
            tabs: _Tabs,
            isScrollable: true,
          ),
        ),
        body: new TabBarView(
          children: _Tabs.map((Tab tab) {
            return new Center(child: Text(tab.text));
          }).toList(),
        ),
      ),
    );
  }
}